﻿using UnityEngine;
using System.Collections;

namespace Lost{
	/// <summary>
	/// 可交互物品
	/// </summary>
	public class InteractiveItem : ItemTag {
		/// 物品介绍
		public string Introduction;
		[SerializeField]protected bool IsInteractive = true;

		public virtual void Interact(HitInf hitInf){
			if (!IsInteractive) {
				return;
			}
			Debug.Log (name + " : " + Introduction);
		}

		public InteractiveItem CopyTo (GameObject target)
		{
			InteractiveItem copyIT = target.AddComponent<InteractiveItem> ();
			copyIT.ItemName = this.ItemName;
			copyIT.Introduction = this.Introduction;
			return copyIT;
		}

		public void SetInteractive(bool intive){
			IsInteractive = intive;
		}
	}

}
